#!/usr/bin/python
import string  
s=input('please input string:')  
letters = 0  
space = 0  
digit = 0  
others =0  
for ch in s:  
    if ch.isalpha():  
        letters += 1  
    elif ch.isspace():  
        space += 1  
    elif ch.isdigit():  
        digit += 1  
    else:  
        others += 1  
print(letters, space , digit, others)

